home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
C++ für Kids
/
C++ for kids.iso
/
SETUP
/
US
/
CBUILDER
/
DATA.Z
/
MPLAYER.HPP
< prev
next >
Wrap
C/C++ Source or Header
|
1997-02-13
|
11KB
|
280 lines
//----------------------------------------------------------------------------
// MPlayer.hpp - bcbdcc32 generated hdr (DO NOT EDIT) rev: 0
// From: MPlayer.pas
//----------------------------------------------------------------------------
#ifndef MPlayerHPP
#define MPlayerHPP
//----------------------------------------------------------------------------
#include <Menus.hpp>
#include <SysUtils.hpp>
#include <Dialogs.hpp>
#include <MMSystem.hpp>
#include <Messages.hpp>
#include <Graphics.hpp>
#include <Forms.hpp>
#include <Controls.hpp>
#include <Classes.hpp>
#include <Windows.hpp>
#include <System.hpp>
#pragma warn -par
#pragma warn -hid
#pragma warn -inl
namespace Mplayer
{
//-- type declarations -------------------------------------------------------
enum TMPBtnType { btPlay, btPause, btStop, btNext, btPrev, btStep, btBack, btRecord, btEject };
typedef Set<TMPBtnType, btPlay, btEject> TButtonSet;
enum TMPGlyph { mgEnabled, mgDisabled, mgColored };
struct TMPButton
{
bool Visible;
bool Enabled;
bool Colored;
bool Auto;
Graphics::TBitmap* Bitmaps[3];
} ;
enum TMPDeviceTypes { dtAutoSelect, dtAVIVideo, dtCDAudio, dtDAT, dtDigitalVideo, dtMMMovie, dtOther,
dtOverlay, dtScanner, dtSequencer, dtVCR, dtVideodisc, dtWaveAudio };
enum TMPTimeFormats { tfMilliseconds, tfHMS, tfMSF, tfFrames, tfSMPTE24, tfSMPTE25, tfSMPTE30, tfSMPTE30Drop,
tfBytes, tfSamples, tfTMSF };
enum TMPModes { mpNotReady, mpStopped, mpPlaying, mpRecording, mpSeeking, mpPaused, mpOpen };
enum TMPNotifyValues { nvSuccessful, nvSuperseded, nvAborted, nvFailure };
enum TMPDevCaps { mpCanStep, mpCanEject, mpCanPlay, mpCanRecord, mpUsesWindow };
typedef Set<TMPDevCaps, mpCanStep, mpUsesWindow> TMPDevCapsSet;
typedef void __fastcall (__closure *EMPNotify)(System::TObject* Sender, TMPBtnType Button, bool &DoDefault
);
typedef void __fastcall (__closure *EMPPostNotify)(System::TObject* Sender, TMPBtnType Button);
class __declspec(delphiclass) EMCIDeviceError;
class __declspec(pascalimplementation) EMCIDeviceError : public Sysutils::Exception
{
typedef Sysutils::Exception inherited;
public:
/* Exception.Create */ __fastcall EMCIDeviceError(const System::AnsiString Msg) : Sysutils::Exception(
Msg) { }
/* Exception.CreateFmt */ __fastcall EMCIDeviceError(const System::AnsiString Msg, const System::TVarRec
* Args, const int Args_Size) : Sysutils::Exception(Msg, Args, Args_Size) { }
/* Exception.CreateRes */ __fastcall EMCIDeviceError(int Ident) : Sysutils::Exception(Ident) { }
/* Exception.CreateResFmt */ __fastcall EMCIDeviceError(int Ident, const System::TVarRec * Args, const
int Args_Size) : Sysutils::Exception(Ident, Args, Args_Size) { }
/* Exception.CreateHelp */ __fastcall EMCIDeviceError(const System::AnsiString Msg, int AHelpContext
) : Sysutils::Exception(Msg, AHelpContext) { }
/* Exception.CreateFmtHelp */ __fastcall EMCIDeviceError(const System::AnsiString Msg, const System::TVarRec
* Args, const int Args_Size, int AHelpContext) : Sysutils::Exception(Msg, Args, Args_Size, AHelpContext
) { }
/* Exception.CreateResHelp */ __fastcall EMCIDeviceError(int Ident, int AHelpContext) : Sysutils::Exception(
Ident, AHelpContext) { }
/* Exception.CreateResFmtHelp */ __fastcall EMCIDeviceError(int Ident, const System::TVarRec * Args
, const int Args_Size, int AHelpContext) : Sysutils::Exception(Ident, Args, Args_Size, AHelpContext
) { }
public:
/* TObject.Destroy */ __fastcall virtual ~EMCIDeviceError(void) { }
};
class __declspec(delphiclass) TMediaPlayer;
class __declspec(pascalimplementation) TMediaPlayer : public Controls::TCustomControl
{
typedef Controls::TCustomControl inherited;
private:
TMPButton Buttons[9];
TButtonSet FVisibleButtons;
TButtonSet FEnabledButtons;
TButtonSet FColoredButtons;
TButtonSet FAutoButtons;
bool Pressed;
bool Down;
TMPBtnType CurrentButton;
Windows::TRect CurrentRect;
int ButtonWidth;
POINT MinBtnSize;
EMPNotify FOnClick;
EMPPostNotify FOnPostClick;
Classes::TNotifyEvent FOnNotify;
TMPBtnType FocusedButton;
bool MCIOpened;
TMPDevCapsSet FCapabilities;
bool FCanPlay;
bool FCanStep;
bool FCanEject;
bool FCanRecord;
bool FHasVideo;
long FFlags;
bool FWait;
bool FNotify;
bool FUseWait;
bool FUseNotify;
bool FUseFrom;
bool FUseTo;
Word FDeviceID;
TMPDeviceTypes FDeviceType;
long FTo;
long FFrom;
long FFrames;
long FError;
TMPNotifyValues FNotifyValue;
Controls::TWinControl* FDisplay;
int FDWidth;
int FDHeight;
System::AnsiString FElementName;
bool FAutoEnable;
bool FAutoOpen;
bool FAutoRewind;
bool FShareable;
void __fastcall LoadBitmaps(void);
void __fastcall DestroyBitmaps(void);
void __fastcall SetEnabledButtons(TButtonSet Value);
void __fastcall SetColored(TButtonSet Value);
HIDESBASE void __fastcall SetVisible(TButtonSet Value);
void __fastcall SetAutoEnable(bool Value);
void __fastcall DrawAutoButtons(void);
HIDESBASE void __fastcall DoMouseDown(int XPos, int YPos);
HIDESBASE MESSAGE void __fastcall WMLButtonDown(Messages::TWMMouse &Message);
HIDESBASE MESSAGE void __fastcall WMLButtonDblClk(Messages::TWMMouse &Message);
HIDESBASE MESSAGE void __fastcall WMMouseMove(Messages::TWMMouse &Message);
HIDESBASE MESSAGE void __fastcall WMLButtonUp(Messages::TWMMouse &Message);
HIDESBASE MESSAGE void __fastcall WMSetFocus(Messages::TWMSetFocus &Message);
HIDESBASE MESSAGE void __fastcall WMKillFocus(Messages::TWMKillFocus &Message);
MESSAGE void __fastcall WMGetDlgCode(Messages::TWMNoParams &Message);
HIDESBASE MESSAGE void __fastcall WMSize(Messages::TWMSize &Message);
virtual void __fastcall KeyDown(Word &Key, Classes::TShiftState Shift);
int __fastcall VisibleButtonCount(void);
void __fastcall Adjust(void);
void __fastcall DoClick(TMPBtnType Button);
void __fastcall DoPostClick(TMPBtnType Button);
void __fastcall DrawButton(TMPBtnType Btn, int X);
void __fastcall CheckIfOpen(void);
void __fastcall SetPosition(long Value);
void __fastcall SetDeviceType(TMPDeviceTypes Value);
void __fastcall SetWait(bool Flag);
void __fastcall SetNotify(bool Flag);
void __fastcall SetFrom(long Value);
void __fastcall SetTo(long Value);
void __fastcall SetTimeFormat(TMPTimeFormats Value);
void __fastcall SetDisplay(Controls::TWinControl* Value);
void __fastcall SetOrigDisplay(void);
void __fastcall SetDisplayRect(const Windows::TRect &Value);
Windows::TRect __fastcall GetDisplayRect(void);
void __fastcall GetDeviceCaps(void);
long __fastcall GetStart(void);
long __fastcall GetLength(void);
TMPModes __fastcall GetMode(void);
long __fastcall GetTracks(void);
long __fastcall GetPosition(void);
System::AnsiString __fastcall GetErrorMessage(void);
TMPTimeFormats __fastcall GetTimeFormat(void);
long __fastcall GetTrackLength(int TrackNum);
long __fastcall GetTrackPosition(int TrackNum);
protected:
virtual void __fastcall Loaded(void);
virtual void __fastcall AutoButtonSet(TMPBtnType Btn);
virtual void __fastcall Notification(Classes::TComponent* AComponent, Classes::TOperation Operation
);
virtual void __fastcall Paint(void);
MESSAGE void __fastcall MMNotify(Messages::TMessage &Message);
HIDESBASE virtual void __fastcall Click(TMPBtnType Button, bool &DoDefault);
virtual void __fastcall PostClick(TMPBtnType Button);
virtual void __fastcall DoNotify(void);
virtual void __fastcall Updated(void);
public:
__fastcall virtual TMediaPlayer(Classes::TComponent* AOwner);
__fastcall virtual ~TMediaPlayer(void);
void __fastcall Open(void);
void __fastcall Close(void);
void __fastcall Play(void);
void __fastcall Stop(void);
void __fastcall Pause(void);
void __fastcall Step(void);
void __fastcall Back(void);
void __fastcall Previous(void);
void __fastcall Next(void);
void __fastcall StartRecording(void);
void __fastcall Eject(void);
void __fastcall Save(void);
void __fastcall PauseOnly(void);
void __fastcall Resume(void);
void __fastcall Rewind(void);
__property long TrackLength[int TrackNum] = {read=